import React from 'react'
import { useHistory } from 'react-router-dom'
import Test from './Test'

export default function SingList(props) {
  const history = useHistory()
  const handleClick = () => {
    // !推荐
    history.push('/mymusic')
    // !props 跳转的方式只适用与路由级别的组件
    // props.history.push('/mymusic')
  }
  return (
    <div>
      <h3>SingList</h3>
      <Test />
      <button onClick={handleClick}>MyMusic</button>
    </div>
  )
}
